Page({
  data: {
    swiper: [
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', url: '' },
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', url: '' },
    ],

    notice: [
      { title: '通知演示标题', time: '04-08' },
      { title: '平台开发进展通知', time: '04-04' },
      { title: '平台定案通知', time: '04-01' },
    ],

    job: [
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', name: '岗位1', date: '2025-04-08', company: '电子科技大学', auth: false },
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', name: '岗位2', date: '2025-04-06', company: '电子科技大学', auth: true },
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', name: '岗位3', date: '2025-04-01', company: '电子科技大学', auth: true },
      { pic: 'https://img1.baidu.com/it/u=3518673092,2032183538&fm=253&fmt=auto&app=138&f=JPEG?w=781&h=500', name: '岗位4', date: '2025-03-06', company: '电子科技大学', auth: false },
    ],
    text: ''
  },

  onLoad(options) {
    
  },

  onShow() {
    if (typeof this.getTabBar === "function" && this.getTabBar()) {
      this.getTabBar().setData({
        selected: 0,
      });
    }
  },

  onJump(e) {
    const { url } = e.currentTarget.dataset;
    console.log(url);
    wx.navigateTo({
      url
    });
  },

  onInput(e) {
    this.setData({ text: e.detail.value });
  },
  onSearch() {
    const { text } = this.data;
    wx.switchTab({
      url: '/pages/jobs/jobs?text=' + text,
    });
  },
})